import { http } from '@/utils'


// 2.获取解决方案详情
export interface DetailResponse {
    code: number;
    data: Datum[];
    recom_data: RecomDatum[];
    [property: string]: any;
}

export interface Datum {
    author?: string;
    category?: number;
    category2?: number;
    category2_name?: string;
    category_name?: string;
    content?: string;
    default_image?: string;
    description?: string;
    id?: number;
    keywords?: null;
    release_time?: string;
    router?: null;
    title?: string;
    [property: string]: any;
}

export interface RecomDatum {
    alt: null | string;
    default_image: string;
    description: string;
    id: number;
    keywords: null | string;
    release_time: string;
    router: null;
    title: string;
    [property: string]: any;
}

export type ReqParams = {
    id: string | undefined
  }

export function fetchSolutionDetailAPI(params: ReqParams) {
    return http.request<DetailResponse>({
        url: '/solution/detail/',
        params,
    })
}